<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #banner{
            width: 550px;
            height: 321px;
            border: 1px solid #f60;
            margin: 100px auto;
            position: relative;
        }
        #banner .pic a{
            position: absolute;
            left: 0;
            top: 0;
            display: none;
        }
        #banner a.show {
            display: block;
        }
        #banner .product_name{
            width: 100%;
            position: absolute;
            left: 0;
            bottom: 0;
        }
        #banner .product_name a{
            display: block;
            width: 79px;
            height: 32px;
            padding: 5px 15px;
            background: #444;
            opacity: 0.7;
            float: left;
            margin-right: 1px;
            filter: alpha(opacity = 70);
        }
        #banner .product_name a.active{
            background:#37A7D7 url("img/adindex.gif") no-repeat center 39px;
        }
        .product_name ul li{
            list-style-type: none;
        }


    </style>
</head>
<body>
<div id="banner">
    <div class="pic">
        <a class="show" href="#"><img src="img/1.jpg" alt=""></a>
        <a href="#"><img src="img/2.jpg" alt=""></a>
        <a href="#"><img src="img/3.jpg" alt=""></a>
        <a href="#"><img src="img/4.jpg" alt=""></a>
        <a href="#"><img src="img/5.jpg" alt=""></a>
    </div>
    <div class="product_name">
        <ul>
            <a href="#" class="active"></a>
            <a href="#"></a>
            <a href="#"></a>
            <a href="#"></a>
            <a href="#"></a>
        </ul>
    </div>
</div>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function () {
        var _index = 0;
        function slider  (_index) {
            $("#banner .product_name a").eq(_index).addClass("active").siblings().removeClass("active");
            $("#banner .pic a").eq(_index).fadeIn().siblings().fadeOut();
            
        }
        $("#banner .product_name a").mouseover(function () {
            _index = $(this).index();
            slider(_index);
            
        })
        function  change() {
            if (_index ==4){
                _index =0;
            }else {
                _index++;
            }
            slider(_index);
        }
        var timer = setInterval(change,1000);

        $(".banner").hover(function () {
            clearInterval(timer);
        },function () {
            timer = setInterval(change,1000);
        })


    })
</script>